﻿<controls:ChildWindow x:Class="Didsoft.SalesLive.UI.Views.VwUsuarioModal"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:didsoft_controls="clr-namespace:Didsoft.Silverlight.Controls;assembly=Didsoft.Silverlight.Controls"
            xmlns:didsoft_controls_data="clr-namespace:Didsoft.Silverlight.Controls.Data;assembly=Didsoft.Silverlight.Controls.Data"         
           Width="703" Height="367" 
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           Title="VwUsuarioModal">
    <Grid x:Name="LayoutRoot" Margin="2">
        <didsoft_controls:FormHeader TitleText="Administrar Usuarios" DescriptionText="Registrese en SalesLive y disfrute de los beneficios del sistema">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="311"/>
                    <ColumnDefinition Width="370*" />
                </Grid.ColumnDefinitions>

                <Grid>
                    <Button Content="Guardar" Height="23"  HorizontalAlignment="Left" Margin="122,222,0,0" x:Name="button1" VerticalAlignment="Top" Width="75" Command="{Binding CmdGuardar, Mode=TwoWay}" />
                    <TextBlock FontWeight="Bold" Height="16" HorizontalAlignment="Left" Margin="7,8,0,0" x:Name="textBlock11" Text="DATOS DE USUARIO" VerticalAlignment="Top" Width="140" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="65,102,0,0" x:Name="textBlock12" Text="Usuario :" VerticalAlignment="Top" Width="54" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="125,98,0,0" x:Name="textBox6" VerticalAlignment="Top" Width="154" Text="{Binding Usuario.NombreUsuario,Mode=TwoWay}" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="46,131,0,0" x:Name="textBlock13" Text="Contraseña :" VerticalAlignment="Top" />
                    <PasswordBox Height="23" HorizontalAlignment="Left" Margin="125,127,0,0" x:Name="passwordBox1" VerticalAlignment="Top" Width="154" Password="{Binding Usuario.Contrasena,Mode=TwoWay}"/>
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="11,160,0,0" x:Name="textBlock14" Text="Repita Contraseña:" VerticalAlignment="Top" />
                    <PasswordBox Height="23" HorizontalAlignment="Left" Margin="125,156,0,0" x:Name="passwordBox2" VerticalAlignment="Top" Width="154" Password="{Binding Usuario.Contrasena,Mode=TwoWay}" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="125,185,0,0" x:Name="textBox7" VerticalAlignment="Top" Width="154" Text="{Binding Usuario.PistaContrasena,Mode=TwoWay}" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="20,189,0,0" x:Name="textBlock15" Text="Pista contraseña:" VerticalAlignment="Top" />
                    <Button Content="Nuevo" Height="24" Margin="63,222,0,0" VerticalAlignment="Top" Command="{Binding CmdNuevo, Mode=TwoWay}" HorizontalAlignment="Left" Width="55" />
                    <Button Content="Eliminar" Height="23" HorizontalAlignment="Left" Margin="204,223,0,0" x:Name="button2_Copy" Command="{Binding CmdEliminar, Mode=TwoWay}" VerticalAlignment="Top" Width="75" />
                    <ComboBox Height="23" HorizontalAlignment="Left" Margin="125,69,0,0" Name="comboBox1" VerticalAlignment="Top" Width="154" ItemsSource="{Binding Roles,Mode=TwoWay}" DisplayMemberPath="NombreTipo" SelectedItem="{Binding Usuario.Rol,Mode=TwoWay}"/>
                    <ComboBox Height="23" HorizontalAlignment="Left" Margin="125,40,0,0" Name="comboBox2" VerticalAlignment="Top" Width="154" ItemsSource="{Binding Personas,Mode=TwoWay}" SelectedItem="{Binding Usuario.Persona,Mode=TwoWay}"  />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="94,73,0,0" Name="textBlock1" Text="Rol:" VerticalAlignment="Top" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="67,44,0,0" Name="textBlock2" Text="Persona:" VerticalAlignment="Top" Width="51" />
                </Grid>

                <Grid Grid.Column="1" Margin="0,0,0,0">
                    <sdk:DataGrid AutoGenerateColumns="True" Margin="0" x:Name="dataGrid1" Height="266" ItemsSource="{Binding Usuarios, Mode=TwoWay}" SelectedItem="{Binding Usuario, Mode=TwoWay}"/>

                </Grid>

            </Grid>

        </didsoft_controls:FormHeader>
    </Grid>
</controls:ChildWindow>